package com.jrx.anytxn.reporting.job.unionFile.step;

import com.jrx.anytxn.customer.entity.CmCustomerAddressInfo;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.batch.MyBatisPagingItemReader;

import java.util.HashMap;
import java.util.Map;

public class AddressFileReader extends MyBatisPagingItemReader<CmCustomerAddressInfo> {

    public AddressFileReader(SqlSessionFactory sqlSessionFactory , Integer pageSize , String startDate){
        setSaveState(false);
        setPageSize(pageSize);
        setSqlSessionFactory(sqlSessionFactory);
        setQueryId("com.jrx.anytxn.customer.mapper.ext.ExtCmCustomerAddressInfoMapper.selectByUpdateTime");
        Map<String,Object> map = new HashMap<>();
        map.put("startTime",startDate);
        setParameterValues(map);
    }
}
